using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using webapp4U.BOL;

namespace webapp4U.UI.Controls
{
    public partial class Controls_MenuLeft : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Load_BangGiaVang();
        }


        protected string GetDateUpdate()
        {
            try
            {
                DateTime obj = ClassData.ReturnDateTime("select top 1 Ngay from w4u_BangGiaVang");

                return webapp4U.Formatter.FormatDate(obj).ToString() + ", " + obj.ToShortTimeString().ToString();
            }
            catch
            {
                return "";
            }
        }


        private void Load_BangGiaVang()
        {
            // load bang gia vang
            DataSet ds = ClassData.ReturnDataSet("select * from w4u_BangGiaVang Where Muavao<>''", "table");
            rptBangGiaVang.DataSource = ds;
            rptBangGiaVang.DataBind();
        }
      
    }
}